public class RecursionSum {

    public static int sum(int n){
        if(n == 1){
            return 1;
        }
        int tmp = n + sum(n-1);
        return tmp;
    }
    public static void main(String[] args) {
        int n = 10;
        int s = sum(n);
        System.out.println(s);
    }
}
